-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reduce verbosity with modern idioms #2
Conversation
…ns. Rename namespace chain to chains
Welcome to Codecov 🎉Once merged to your default branch, Codecov will compare your coverage reports and display the results in this comment. Thanks for integrating Codecov - We've got you covered ☂️ |
@@ -101,50 +100,53 @@ using segment_result_type = | |||
simplify this code by handing the multi-argument case earlier (somehow). | |||
*/ | |||
|
|||
#define STLAB_FWD(x) std::forward<decltype(x)>(x) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know where this goes long term, but I feel strongly we need it somewhere. If I see another std::forward<decltype(args)>(args)...
I may weep.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should probably be CHAINS_FORWARD()
and would go in <chains/utility.hpp>
(same header name that contains std::forward<>
- not a general dumping ground of utilities).
return std::move(_segment).invoke(receiver, STLAB_FWD(args)...); | ||
}; | ||
} else { | ||
return [receiver, _segment = STLAB_FWD(first).append( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like the auto formatting is not helping readability here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some comment, but approved.
@@ -6,7 +6,7 @@ | |||
#ifndef CHAIN_TUPLE_HPP | |||
#define CHAIN_TUPLE_HPP | |||
|
|||
namespace chain::inline v0 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is okay - I wanted to get rid of the plural for the project. Other non-chain suggestions for library and namespace names?
@@ -6,9 +6,9 @@ | |||
#include <random> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feel free to just strip all the example files (I've been removing them one by one) instead of reformatting them.
@@ -101,50 +100,53 @@ using segment_result_type = | |||
simplify this code by handing the multi-argument case earlier (somehow). | |||
*/ | |||
|
|||
#define STLAB_FWD(x) std::forward<decltype(x)>(x) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should probably be CHAINS_FORWARD()
and would go in <chains/utility.hpp>
(same header name that contains std::forward<>
- not a general dumping ground of utilities).
namespace chain
tonamespace chains
in order to achieve the above (there was ambiguity when statingchain::chain{...}
)template <class... Args> result_type...
and maderesult_type_helper
consteval
It seems the auto clang-format also reformatted a few files.